/*
 * @Description: 
 * @Version: 1.0
 * @Author: truman
 * @Date: 2024-01-12 23:17:45
 * @LastEditors: truman
 * @LastEditTime: 2024-02-23 21:59:58
 */
/*
 * @Description: 
 * @Version: 1.0
 * @Author: truman
 * @Date: 2024-01-12 23:17:45
 * @LastEditors: truman
 * @LastEditTime: 2024-01-13 20:25:48
 */
/**
 * 严肃声明：
 * 开源版本请务必保留此注释头信息，若删除我方将保留所有法律责任追究！
 * 本系统已申请软件著作权，受国家版权局知识产权以及国家计算机软件著作权保护！
 * 可正常分享和学习源码，不得用于违法犯罪活动，违者必究！
 * Copyright (c) 2020 陈尼克 all rights reserved.
 * 版权所有，侵权必究！
 */

import axios from '../utils/axios'

export function getDetail(id) {
  return axios.get(`/recruit/position/${id}`);
}

export function updateHits(id) {
  return axios.put(`/recruit/position/hits/${id}`);
}

export function getCategory() {
  return axios.get('/menus/tree');
}

export function search(params) {
  return axios.get('/search', { params });
}

export function getHR(hrID) {
  return axios.get(`/recruit/hr-company/${hrID}`);
}

export function uploadFile(data) {
  return axios.post('/recruit/file', data, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
}

export function create(data) {
  return axios.post('/recruit/position', data);
}
export function update(data) {
  return axios.put('/recruit/position/'+ data.id, data);
}

